from .controller_base import ControllerBase

class PIDController(ControllerBase):
    def __init__(self, kp, ki, kd):
        self.kp = kp
        self.ki = ki
        self.kd = kd
        print(f"[PID] 初始化: kp={kp}, ki={ki}, kd={kd}")

    def compute(self, target):
        # 模拟 PID 计算
        dx = 5
        dy = 5
        print(f"[PID] 目标 {target} → 计算控制量 dx={dx}, dy={dy}")
        return dx, dy
